#
# Copyright (C) 2018-2025 Intel Corporation
#
# SPDX-License-Identifier: MIT
#

set(IGDRCL_SRCS_tests_api
    ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
    ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}additional_extensions_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/api_tests_wrapper1.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/api_tests_wrapper2.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/api_tests_wrapper3.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_add_comment_to_aub_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_api_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_api_tests.h
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_build_program_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_clone_kernel_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_compile_program_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_buffer_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_command_queue_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_command_queue_with_properties_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_context_from_type_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_context_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_image_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_kernel_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_kernels_in_program_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_perf_counters_command_queue_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_pipe_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_program_with_binary_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}cl_create_program_with_binary_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_program_with_built_in_kernels_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_sampler_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_sampler_with_properties_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_sub_buffer_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_sub_devices_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_create_user_event_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_barrier_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_barrier_with_wait_list_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_copy_buffer_rect_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_copy_buffer_to_image_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_copy_image_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_copy_image_to_buffer_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_fill_buffer_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_fill_image_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_image_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_map_buffer_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_map_image_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_marker_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_marker_with_wait_list_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_migrate_mem_objects_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_native_kernel_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_nd_range_kernel_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_read_buffer_rect_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_read_buffer_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_read_image_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_svm_free_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_svm_map_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_svm_mem_fill_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_svm_memcpy_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_svm_migrate_mem_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_svm_unmap_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_task_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_unmap_mem_object_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_verify_memory.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_wait_for_events_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_write_buffer_rect_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_write_buffer_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_enqueue_write_image_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_external_memory_extension_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_finish_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_flush_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_function_pointers_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_context_info_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_device_and_host_timer.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_device_ids_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_device_info_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_event_profiling_info_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_extension_function_address_for_platform_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_extension_function_address_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_image_info_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_image_params_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_kernel_arg_info_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_kernel_info_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_kernel_max_concurrent_work_group_count_intel_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_kernel_sub_group_info_khr_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_kernel_sub_group_info_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_kernel_suggested_local_work_size_intel_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_kernel_suggested_local_work_size_khr_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_kernel_work_group_info_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_mem_object_info_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_platform_ids_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_platform_info_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_program_build_info_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_program_info_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_supported_image_formats_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_icd_get_platform_ids_khr_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_intel_tracing_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_link_program_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_mem_locally_uncached_resource_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_release_command_queue_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_release_context_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_release_event_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_release_kernel_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_release_mem_obj_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_release_program_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_retain_mem_obj_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_retain_release_command_queue_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_retain_release_context_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_retain_release_device_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_retain_release_sampler_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_set_context_destructor_callback.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_set_event_callback_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_set_kernel_arg_svm_pointer_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_set_kernel_exec_info_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_set_mem_object_destructor_callback_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_set_performance_configuration_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_set_program_release_callback.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_set_program_specialization_constant_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_svm_alloc_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_svm_free_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_unified_shared_memory_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_unload_compiler_tests.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/cl_unload_platform_compiler_tests.inl
)

if(TESTS_PVC_AND_LATER)
  list(APPEND IGDRCL_SRCS_tests_api ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_device_info_pvc_and_later_tests.cpp)
endif()

target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_api})

add_subdirectories()
